package com.dong.design.adapter;

/**
 * 适配器模式
 * 让一个类拥有另一个和自己没有关联的类的能力
 * 适配器只用于解决现在有问题时使用，不是在设计时添加
 * @author jianyang206881
 * @date 2018/6/8
 */
public class AdapterPatternDemo {
    public static void main(String[] args) {
        AudioPlayer audioPlayer = new AudioPlayer();

        audioPlayer.play("mp3", "beyond the horizon.mp3");
        audioPlayer.play("mp4", "alone.mp4");
        audioPlayer.play("vlc", "far far away.vlc");
        audioPlayer.play("avi", "mind me.avi");
    }
}
